package com.roroldo.springcloud.alibaba.controller.handler;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.roroldo.springcloud.entities.CommonResult;

/**
 * 处理熔断限流的异常处理类
 * @author 落霞不孤
 */
public class CustomerBlockHandler {
    public static CommonResult handleException(BlockException exception) {
        return new CommonResult(2022, "自定义的限流处理信息......CustomerBlockHandler" + exception.getMessage());
    }

    public static CommonResult handleException2(BlockException exception) {
        return new CommonResult(2022, "自定义的限流处理信息......CustomerBlockHandler2" + exception.toString());
    }
}
